-
Couldn't load subscription status.
- Fork 0
APE-4296 | Android webview test app #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Implemented payment flow with UK (GBP/Faster Payments) and EU (EUR/SEPA) support - Added scrollable UI with payee name input field - Removed default/prepopulated account details for clean user experience - Fixed IBAN input to trim whitespace before validation - Configured for BETA environment with proper API key integration
AamirMaan
approved these changes
Sep 15, 2025
AamirMaan
pushed a commit
that referenced
this pull request
Sep 18, 2025
# Token.io Android WebView SDK Demo Application
## 📋 Overview
This PR introduces a comprehensive Android demo application showcasing
the Token.io WebView SDK
integration for secure payment processing. The application demonstrates
best practices for payment
flow handling with robust WebView implementation and multi-regional
support.
## ✨ Key Features
### 🌐 WebView Payment Integration
- **Secure WebView Implementation**: Custom `UnifiedWebViewClient` for
handling payment redirects
- **Dual Callback Support**: Handles payment callbacks from both in-app
WebView and external
browsers
- **Payment Flow Activities**:
- `PaymentWebViewActivity` - Main payment interface
- `PaymentResultActivity` - Payment outcome display
- `WebViewActivity` - General web content handling
### 🇫🇷 France Market Support
- **Locale-aware Amount Formatting**: Prevents locale-specific decimal
separator issues (e.g.,
French comma vs English decimal point)
- **Multi-currency Support**: EUR and GBP payment processing
- **Localized Payment Experience**: Proper handling of French banking
redirects and callbacks
### 🛡️ Security & Configuration
- **API Key Management**: Secure BuildConfig integration with
placeholder system
- **Environment Configuration**: Beta environment setup with
configurable endpoints
- **Deep Link Security**: Proper intent filter configuration for payment
callbacks
## 🏗️ Technical Implementation
### Core Components
- **PaymentSdk**: Main SDK interface with simplified integration API
- **PaymentRepository**: Network layer for payment operations using
Retrofit + Moshi
- **Constants**: Environment and configuration management
- **Data Models**: Type-safe payment request/response handling
### WebView Architecture
Unified callback handling for all payment scenarios:
UnifiedWebViewClient -> PaymentWebViewActivity -> PaymentResultActivity
↓
External Browser Redirect -> MainActivity (Deep Link) ->
PaymentResultActivity
### Payment Flow
1. **Initiation**: Create PaymentRequest with creditor details and
amount
2. **WebView Launch**: Secure payment interface with bank redirect
handling
3. **Callback Processing**: Unified handling regardless of redirect
method
4. **Result Display**: Clear payment outcome with appropriate messaging
## 🔧 Configuration
### Manifest Setup
- Deep link configuration for `paymentdemoapp://payment-complete`
- Activity declarations with proper launch modes
- Intent filter on MainActivity for external callback handling
### Build Configuration
- KSP for Moshi code generation
- Firebase integration for analytics and user onboarding
- Comprehensive dependency management
## 📱 User Experience
- **Intuitive Interface**: Clean material design with form validation
- **Error Handling**: Comprehensive error states and user feedback
- **Loading States**: Progress indicators during payment processing
- **Accessibility**: Proper content descriptions and navigation
## 🔄 Git Repository Cleanup
- **Comprehensive .gitignore**: Excludes build artifacts, IDE files, and
APK outputs
- **Security**: API keys replaced with placeholders for safe version
control
- **Clean History**: Removed accidentally committed build files and IDE
configurations
## 🌍 Market Readiness
This implementation is production-ready for:
- **UK Market**: Faster Payments integration
- **French Market**: SEPA payment support with proper locale handling
- **Multi-currency**: GBP and EUR support with accurate formatting
---
**🔗 Related Issues**: APE-4296
**📊 Testing**: Manual testing completed for both WebView and browser
redirect scenarios
**🎯 Target**: UK and EU including France market deployment with WebView
payment integration
---------
Co-authored-by: Sam French <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Token.io Android WebView SDK Demo Application
📋 Overview
This PR introduces a comprehensive Android demo application showcasing the Token.io WebView SDK
integration for secure payment processing. The application demonstrates best practices for payment
flow handling with robust WebView implementation and multi-regional support.
✨ Key Features
🌐 WebView Payment Integration
UnifiedWebViewClientfor handling payment redirectsbrowsers
PaymentWebViewActivity- Main payment interfacePaymentResultActivity- Payment outcome displayWebViewActivity- General web content handling🇫🇷 France Market Support
French comma vs English decimal point)
🛡️ Security & Configuration
🏗️ Technical Implementation
Core Components
WebView Architecture
Unified callback handling for all payment scenarios:
UnifiedWebViewClient -> PaymentWebViewActivity -> PaymentResultActivity
↓
External Browser Redirect -> MainActivity (Deep Link) -> PaymentResultActivity
Payment Flow
🔧 Configuration
Manifest Setup
paymentdemoapp://payment-completeBuild Configuration
📱 User Experience
🔄 Git Repository Cleanup
🌍 Market Readiness
This implementation is production-ready for:
🔗 Related Issues: APE-4296
📊 Testing: Manual testing completed for both WebView and browser redirect scenarios
🎯 Target: UK and EU including France market deployment with WebView payment integration